package org.anarcoding.twitterbot.view;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class ShlAnarcoTwitterPrincipal extends Shell {

	private CmpAnarcoTwitterPrincipal	cmpAnarcoTwitterPrincipal;

	/**
	 * Launch the application.
	 * 
	 * @param args
	 */
	public static void main( String args[] ) {
		try {
			Display display = Display.getDefault();
			ShlAnarcoTwitterPrincipal shell = new ShlAnarcoTwitterPrincipal( display );
			shell.open();
			shell.layout();
			while( !shell.isDisposed() ) {
				if( !display.readAndDispatch() ) {
					display.sleep();
				}
			}
		} catch( Exception e ) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the shell.
	 * 
	 * @param display
	 */
	public ShlAnarcoTwitterPrincipal( Display display ) {
		super( display, SWT.SHELL_TRIM );

		cmpAnarcoTwitterPrincipal = new CmpAnarcoTwitterPrincipal( this, SWT.NONE );
		cmpAnarcoTwitterPrincipal.setBounds( 0, 0, 365, 305 );

		new ShlAnarcoTwitterPrincipalControl( cmpAnarcoTwitterPrincipal );
		createContents();
	}

	/**
	 * Create contents of the shell.
	 */
	protected void createContents() {
		setText( "ANARCODING TWITTER ROBOT SYSTEM" );
		setSize( 372, 333 );

	}

	@Override
	protected void checkSubclass() {
		// Disable the check that prevents subclassing of SWT components
	}
}
